package commandset;

public class Grant {
	private static String grant = "Grant";
	private String read_action = "READ";
	private String write_action = "WRITE";
	public String app_id = "<app_id>";
	public String component_id = "<component_id>";
	public String resource_uri = "";

	Grant(String app_id, String component_id, String resource_uri) {
		this.app_id = app_id;
		this.component_id = component_id;
		this.resource_uri = resource_uri;

	}

	public String getApp_id() {
		return app_id;
	}

	public void setApp_id(String app_id) {
		this.app_id = app_id;
	}

	public String getComponent_id() {
		return component_id;
	}

	public void setComponent_id(String component_id) {
		this.component_id = component_id;
	}

	public String getResource_uri() {
		return resource_uri;
	}

	public void setResource_uri(String resource_uri) {
		this.resource_uri = resource_uri;
	}

	public String printGrantWithReadAction() {

		return grant + "(" + app_id + ", " + component_id + ", " + resource_uri
				+ "," + read_action + ");";
	}

	public String printGrantWithWriteAction() {
		return grant + "(" + app_id + ", " + component_id + ", " + resource_uri
				+ ", " + write_action + ");";
	}

}
